package com.atguigu.gmall.order.rest;

import com.atguigu.gmall.model.order.vo.OrderSplitParamVO;
import com.atguigu.gmall.model.order.vo.OrderSplitResultVO;
import com.atguigu.gmall.order.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/order")
public class OrderSplitController {
    @Autowired
    OrderInfoService orderInfoService;


    @PostMapping("/orderSplit")
    public List<OrderSplitResultVO> orderSplit(OrderSplitParamVO orderSplitParamVO) {

        return orderInfoService.orderSplit(orderSplitParamVO);
    }
}
